/**
 * Created by huzhihui on 2017/9/19.
 */
import React from "react";
import {connect} from "dva";
import "./index.css";


class AboutUs extends React.Component {

    componentDidMount() {
        this.getHtml();
    }

    getHtml() {
        const {dispatch} = this.props;
        dispatch({
            type: 'api/updateDefaultSelectedKeys',
            payload: ['4'],
        });
        ;
        dispatch({
            type: 'aboutUs/getAboutUsHtml'
        });
    }

    render() {
        const {aboutUsHtml} = this.props;
        return (
            <div>
                <div dangerouslySetInnerHTML={{__html: aboutUsHtml}}/>
            </div>
        )

    }
}

export default connect(({aboutUs: {aboutUsHtml}}) => ({
    aboutUsHtml
}))(AboutUs);